#
#        Python GUI - Check boxes - Generic
#

from Properties import overridable_property
from Controls import Control
from Actions import Action

class CheckBox(Control, Action):
    """A CheckBox is a control used to represent a binary choice."""
    
    on = overridable_property('on', "Boolean value of the check box.")
    
    auto_toggle = overridable_property('auto_toggle', """If true,
        the check box's 'on' property will automatically be toggled
        before performing the action, if any.""")
    
    _auto_toggle = 1
    
    def get_auto_toggle(self):
        return self._auto_toggle
    
    def set_auto_toggle(self, v):
        self._auto_toggle = v

